import { $post, $get } from "@/utils/request";
import router from "@/router";

// 登录
export const $AbminLogin = async (params: object) => {
    const { id, password } = params
    try {
        await $post(`/abmin/login?id=${id}&password=${password}`)
        sessionStorage.setItem('id', id)
        router.push('/userManager')
    } catch (err: any) {
        alert(err.message)
    }
}